Java OOP Why doesn't the function see variable

welcome to shbcf.ru